# 从文件youbian.txt中获取数据
# 题目： 邮编查询
# 	创建函数， 传入一个邮编，得到归属地
#
"""
import re


def fn(num):
    '''
    :param num: 邮编号
    :return: 无
    '''
    f = open('youbian.txt', 'r')
    content = f.readlines()

    for line in content:
        if str(num) in line:
            print(re.search('\"(.*?)\"', line).group().split('"')[1])
    
    f.close()


fn(110113)
"""


def fn(num):
    fp = open('youbian.txt', 'r', encoding='utf-8')
    li1 = fp.readlines()
    fp.close()

    for row in li1:
        if row[1:7] == str(num):
            print(row[9:-4])


fn(120000)
